<template>
  <div class="p-2">
    <!-- 顶部 Tab 切换 -->
    <el-tabs v-model="activeTab" class="resource-tabs">
      <el-tab-pane label="社会救助中心" name="rescue"></el-tab-pane>
      <el-tab-pane label="街道应急资源" name="resource"></el-tab-pane>
    </el-tabs>
    <!-- 添加容器，根据 activeTab 显示/隐藏 -->
    <div v-show="activeTab === 'rescue'" class="tab-container">
      <rescue />
    </div>

    <div v-show="activeTab === 'resource'" class="tab-container">
      <resource />
    </div>
  </div>
</template>

<script setup lang="ts">
import Resource from '@/views/biz/emgResource/resource.vue';
import Rescue from '@/views/biz/emgResource/rescue.vue';

const { proxy } = getCurrentInstance() as ComponentInternalInstance;

// 添加 tab 激活状态
const activeTab = ref('rescue');
</script>
<style lang="scss" scoped>
.resource-tabs {
  margin-bottom: 20px;
}
.content-container {
  display: flex;
  gap: 40px;
  min-height: calc(100vh - 200px);
}
</style>
